<template>
  <div class="row-talk">
    <div class="title van-multi-ellipsis--l2">{{ title }}</div>
    <div class="content van-multi-ellipsis--l2">{{ content }}</div>

    <div class="footer">
      <div class="auth">
        <img :src="avatar" alt />
        <div class="author">{{ author }}</div>
        <div class="time">{{ time }}</div>
      </div>

      <div class="read">
        <van-icon name="eye-o" :style="{ marginRight: '6px' }" />
        {{ read }}W阅读
      </div>
    </div>
  </div>
</template>

<script>
import Vue from 'vue'
import { Icon } from 'vant'

Vue.use(Icon)

export default {
  props: {
    title: {
      type: String,
      default: ''
    },

    content: {
      type: String,
      default: ''
    },

    read: {
      type: [Number, String],
      default: 0
    },

    avatar: {
      type: String,
      default: ''
    },

    author: {
      type: String,
      default: ''
    },

    time: {
      type: String,
      default: ''
    }
  }
}
</script>

<style lang="less" scoped>
.row-talk {
  border-top: 0.5px solid #eeeeee;
  padding: 11px 0 19px 0;
  margin: 0 17px;

  .title {
    font-size: 17px;
    color: #222222;
    font-weight: 500;
  }

  .content {
    color: #999999;
    font-size: 13px;
    margin: 11px 0 19.5px 0;
  }

  .footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 0.5px solid #eeeeee;
    padding-top: 15px;

    .auth {
      display: flex;
      align-items: center;

      img {
        width: 19px;
        height: 19px;
        border-radius: 50%;
        margin-right: 10px;
      }

      .author, .time {
        font-size: 13px;
        color: #999999;
        margin-right: 8px;
      }
    }

    .read {
      display: flex;
      align-items: center;
      font-size: 10px;
      color: #dddddd;
    }
  }
}
</style>